﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACC.Extensions.Entities
{
    public class LocalSetting
    {
        //Process setting section
        public bool NeedPreLoad { get; set; }
        public bool AutoLoad { get; set; }
        public bool AutoUnload { get; set; }
        public bool NeedOperatorLogin { get; set; }

        public bool UseUnloadPallet { get; set; }

        public bool UseMaterialInOut { get; set; }

        public bool IsCoreMaterial { get; set; }
        public bool UseLineLeaderAssign { get; set; }
        public bool IsFirstOP { get; set; }
        public bool IsDisplayScanNo { get; set; } //显示扫码枪号
        public bool IsDisplayCodeLevel { get; set; } //显示二维码等级
        public bool IsFirstInFirstOut { get; set; } //先进先出

        //是否启用多对一界面
        public bool IsUseUniform { get; set; }
        public bool IsMirroredUniform { get; set; } //镜像的组合方块
        //结果判断选择缺陷原因
        public bool ResultWithReason { get; set; }
        //结果判断使用栅格图
        public bool ResultWithGridPic { get; set; }
        public bool ResultWithGridPicAutoPopup { get; set; }

        //使用生成计划
        public bool IsUseProducePlanGrid { get; set; }
        public bool IsUseBasketBoxGrid { get; set; }

        //界面显示
        public bool IsHardnessUI { get; set; }
        public bool IsGridPicUI { get; set; }
        public bool IsProducePlanUI { get; set; }
        public bool IsOKBtn { get; set; }
        public bool IsNOKBtn { get; set; }
        public bool IsScannerBtn { get; set; }
        public bool IsBarcodeListBtn { get; set; }
        public bool IsRepairBtn { get; set; }

        //报警等级
        public int DefectLevel { get; set; }

        //是否使用PLC
        public bool EnablePLC { get; set; }
        public string PLCDescription { get; set; }
        public string PLC_IP { get; set; }
        public string PLC_Port { get; set; }
        public string PLC_Rack { get; set; }
        public string PLC_Slot { get; set; }

        //端口1
        public bool EnableIP1 { get; set; }
        public string IPAddress1 { get; set; }
        public string IPDescription1 { get; set; }
        public string Port1 { get; set; }

        //端口2
        public bool EnableIP2 { get; set; }
        public string IPAddress2 { get; set; }
        public string IPDescription2 { get; set; }
        public string Port2 { get; set; }

        //端口3
        public bool EnableIP3 { get; set; }
        public string IPAddress3 { get; set; }
        public string IPDescription3 { get; set; }
        public string Port3 { get; set; }


        public bool EnablePLCDB1 { get; set; }
        public string PLCDBAddress1 { get; set; }
        public string PLCDBDescription1 { get; set; }

        public bool EnablePLCDB2 { get; set; }
        public string PLCDBAddress2 { get; set; }
        public string PLCDBDescription2 { get; set; }

        public bool EnablePLCDB3 { get; set; }
        public string PLCDBAddress3 { get; set; }
        public string PLCDBDescription3 { get; set; }

        public bool EnablePLCDB4 { get; set; }
        public string PLCDBAddress4 { get; set; }
        public string PLCDBDescription4 { get; set; }

        public bool EnablePLCDB5 { get; set; }
        public string PLCDBAddress5 { get; set; }
        public string PLCDBDescription5 { get; set; }

        public bool EnablePLCDB6 { get; set; }
        public string PLCDBAddress6 { get; set; }
        public string PLCDBDescription6 { get; set; }

        public bool EnablePLCDB7 { get; set; }
        public string PLCDBAddress7 { get; set; }
        public string PLCDBDescription7 { get; set; }

        public string COM_PortName { get; set; }
        public string COM_BaudRate { get; set; }
        public string COM_Parity { get; set; }
        public string COM_DataBits { get; set; }
        public string COM_StopBits { get; set; }
        public bool COM_Enable { get; set; }

        /// <summary>
        /// 是否从PLC读取OK数
        /// </summary>
        public bool IsReadOKCount { get; set; }
    }
}
